import java.io.IOException;

import javax.imageio.ImageIO;


public class BirdPigeon extends Bird {

	private static final int PIGEON_SPEED = 4;
	private static final int PIGEON_TIME = 15;
	private static final int PIGEON_IMAGE_WIDTH = 28;
	private static final int PIGEON_IMAGE_HEIGHT = 20;
	private static final int PIGEON_BIRD_TYPE = 3;

	public BirdPigeon(){
		super(PIGEON_BIRD_TYPE);
		imageWidth = PIGEON_IMAGE_WIDTH;
		imageHeight = PIGEON_IMAGE_HEIGHT;
		speed = PIGEON_SPEED;
		time = PIGEON_TIME;
		this.loadRessource();
	}

	public void 	loadRessource() {
		try {
			this.imageArray[0] = ImageIO.read((getClass().getResource("Ressources/bird_pigeon_droit.png")));
			this.imageArray[1] = ImageIO.read((getClass().getResource("Ressources/bird_pigeon_gauche.png")));
		} catch (IOException e) { e.printStackTrace(); }
		this.currentImage = this.imageArray[1];
	}

	@Override
	public void setSpeedCoef(double d) {
		if(d > 90) this.speed = this.PIGEON_SPEED;
		this.speed = (d/100)*this.PIGEON_SPEED;
	}
}
